package api

import (
	"github.com/gin-gonic/gin"
	"monthly-test/api/handler"
)

func LoadRouter(r *gin.Engine) {
	api := r.Group("/api")
	{
		user := api.Group("/user")
		{
			user.POST("/register", handler.Register)
			user.POST("/login", handler.Login)
		}
		chat := api.Group("/chat")
		{
			chat.GET("/chat", handler.Chat)
		}
		viper := api.Group("/viper")
		{
			viper.GET("/list", handler.ListViper)
			viper.POST("/Add", handler.AddViper)

		}
	}
}
